﻿using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_ProcecureMainBusiness
    {
        Task<PageResult<PB_ProcecureMain>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PageResult<PB_ProcecureMainDto>> GetDataListAsyncs(PageInput<ConditionDTO> input);
          Task<PageResult<PB_ProcecureMain>> GetDataListByDepartment(string DeptId);

        Task<PB_ProcecureMain> GetTheDataAsync(string id);
        Task AddDataAsync(PB_ProcecureMain data);
        Task UpdateDataAsync(PB_ProcecureMain data);
        Task DeleteDataAsync(List<string> ids);
        Task AddData(PB_ProcecureMainListDTO data);
        Task UpdateData(PB_ProcecureMainListDTO data);
        //Task<string> GetDataDetails(string Id);
        Task<PB_ProcecureMainList> GetDataProceureMain(string ParentId);
    }

    public class PB_ProcecureMainListDTO : PB_ProcecureMain
    {
        /// <summary>
        /// 子工序
        /// </summary>
        public List<PB_ProcecureSub> subData { get; set; }
    }

    public class PB_ProcecureMainList
    {
        /// <summary>
        /// 主工序
        /// </summary>
        public PB_ProcecureMain PB_ProcecureMain { get; set; }
        /// <summary>
        /// 子工序集合
        /// </summary>
        public List<PB_ProcecureSub> PB_ProcecureSub { get; set; }
    }
}